

// It takes about 2 weeks to run the entire code on a Windows PC with 16 GB of RAM.


clear all

timer on 1




cap ssc install maptile
cap ssc install spmap
cap ssc install reghdfe
cap ssc install ftools
cap ssc install parmest
cap ssc install st0085_2
cap ssc install ivreghdfe 
cap ssc install ivreg2
cap ssc install ranktest
cap ssc install binscatter
cap ssc install freduse
cap ssc install st0357
cap ssc install statstates
cap ssc install ppml
cap ssc install ppmlhdfe
cap ssc install coefplot
cap ssc install gtools
cap ssc install geodist
cap ssc install binsreg
cap ssc install csdid
cap ssc install drdid
cap ssc install did_imputation
cap ssc install event_plot
cap ssc install eventstudtyinteract
cap ssc install rwolf
cap ssc install mhtexp
cap ssc install moremata
cap ssc install randcmd
cap ssc install erepost
cap ssc install distinct
cap ssc install elasticregress



// Data cleaning

python script "pythonfiles/import_lichess.py"

do "dofiles/clean_lichess"


do "dofiles/comparison_groups_and_win_prob_main"
do "dofiles/comparison_groups_and_win_prob_main_100bins"
do "dofiles/comparison_groups_and_win_prob_main_lassosplines"

// Data analysis

do "dofiles/summarystats"
do "dofiles/summarystats_matchedsample"
do "dofiles/motivation_table"

do "dofiles/test_fit"

do "dofiles/comparing_marginal_benefit_to_marginal_cost"

do "dofiles/comparison_by_elo"
do "dofiles/comparison_by_startclock"

do "dofiles/comparison_by_elo_robust"
do "dofiles/comparison_by_startclock_robust"


do "dofiles/comparison_by_elo_100bins"
do "dofiles/comparison_by_startclock_100bins"



do "dofiles/comparison_by_elo_lassosplines"
do "dofiles/comparison_by_startclock_lassosplines"

do "dofiles/beep_analysis"
do "dofiles/beep_analysis_by_elo"
do "dofiles/beep_analysis_by_elo30seconds"

//do "dofiles/ols_iv_robust"
do "dofiles/difficulty_balance"


timer off 1
timer list 1

